﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using GzipManagerPro.IO;

namespace GzipManagerPro.UI.Dialogs
{
    public partial class ProgressDialog : Form
    {
        public ProgressDialog()
        {
            InitializeComponent();
        }

        public void TranslateMessage(ArchiveMessageEventArgs e)
        {
            try
            {
                if (e.Level == ArchiveMessageType.ArchiveLevel)
                {
                    this.ArchiveLevelMessage.Text = e.Message;
                    this.ArchiveProgress.Value = (int)e.Percentage;
                }
                else
                {
                    this.FileLevelMessage.Text = e.Message;
                    this.FileProgress.Value = (int)e.Percentage;
                }
            }
            catch
            {
            }
            Application.DoEvents();
        }
    }
}
